1. Field of the Invention
The present invention relates to a data compression apparatus which compresses data such as image data, etc. and a storage medium a data compressing program causing an information processing apparatus such as a computer, etc. to operate as the data compression apparatus.
2. Description of the Related Art
Conventionally, a technique of compressing data such as image data, etc. has been widely used to reduce stored data, amount of communicated data, etc.
For example, Japanese Patent Laid-Open No. 5-328142 discloses a technique of assigning a color number such that sequential color numbers can have color data with close values when a representing color is selected from an original image and a CLUT (color lookup table) is generated, generating a bit map corresponding to the CLUT, obtaining a difference in color number between adjacent pixels, changing the color number of the bit map in the range in which no degradation occurs in image quality when the difference indicates a large value, biasing the difference to a small value, and performing a run length coding process on difference data.
Introduced below is a system to which a data compressing technique is applied.
FIG. 1 shows an example of a printing system to which a data compressing technique is applied. FIG. 2 shows a flow of a data process in the printing system.
As shown in FIG. 1, the printing system includes a host controller 100, interface equipment 200, and a printer 300. The host controller 100 is connected to the interface equipment 200 through a general-purpose interface cable 150 such as an SCSI, etc., and the interface equipment 200 is connected to the printer 300 through a dedicated interface cable 250.
In the host controller 100, as shown in FIG. 2, data 11 of a character and an image described in various languages and formats such as the PDF, the PS, the TIFF, etc. is divided into image (continuous tone (CT)) data and data of line etc. (line work (LW)), bit map data 12A and 13A are generated by performing RIP (raster image processing) on each piece of data, and a data compressing process is performed on each piece of data, thereby generating compressed data 14 on the CT and compressed data 15 on the LW. The compressed data 14 and 15 are transferred from the host controller 100 to the interface equipment 200 through the general-purpose interface cable 150 as shown in FIG. 1. In the interface equipment 200, a data decompressing process is performed on the transferred compressed data 14 and 15, and bit map data 12B and 13B corresponding to the bit map data 12A and 13A in the state before the data compressing process is performed by the host controller 100 are generated.
The interface equipment 200 combines the decompressed CT data (bit map data 12B) and LW data (bit map data 13B), dot information etc. are added as a tag, and the result is transmitted to the printer 300. The printer 300 outputs an image on the basis of the bit map data received from the interface equipment 200 and tag information added to the data.
When it is necessary to have the host controller 100 and the interface equipment 200 as independent devices such as the case where the host controller 100 is, for example, separated from the interface equipment 200, or where the interface equipment 200 receives image data from plural host controllers, then the host controller 100 performs data compression as shown in FIG. 2 and transfers the data to the interface equipment 200, and the interface equipment decompresses the data, thereby shortening the data transfer time from the host controller 100 to the interface equipment 200 and improving the productivity of printing.
Generally, a compressing system such as the JPEG, etc. which is a non-reversible system and has a high compression rate is used for the CT data while a reversible compressing system such as PackBits etc. is used for on the LW data.
However, in the compressing system such as the JPEG, etc., a long time is required to perform the compressing process using software, thereby causing the throughput of the entire system to be degraded.
Although the JPEG, etc. inevitably has the problem of degradation of image quality because it is a non-reversible compressing process, there has been increasing demand for higher image quality. And also, reversible compression for the CT data without degradation of image quality has been studied.